/*
 * @Author: gyc
 * @Date: 2020-05-22 14:44:48
 * @LastEditTime: 2020-05-23 10:14:21
 * @Description: Nuxt测试版
 */
export default ({
    redirect,
    app
}) => {
    app.router.afterEach((to, from) => {
        if (process.client) {
            if (to.path == '/userInfo' && localStorage.getItem('loginUser') == null) {
                console.log(to.path)
                redirect('/')
            }
        }
    })
}